/*****************************************************************
Wowengine3D - v0.1

File: wen_material.h
Creation date: 2012-09-24
*****************************************************************/
#include "wen_material.h"


using namespace wen;


Material::Material()
{	
	ZeroMemory(&m_kMaterial, sizeof(D3DMATERIAL9));

	/*m_kMaterial.Diffuse.r = 1.0f;
	m_kMaterial.Diffuse.g = 1.0f;
	m_kMaterial.Diffuse.b = 1.0f;*/
	m_kMaterial.Diffuse.a = 1.0f;
}

Material::~Material()
{	
}

const D3DMATERIAL9& Material::GetMaterial() const 
{ 
	return m_kMaterial; 
}

void Material::SetAmbientColor(float r, float g, float b, float a)
{
	m_kMaterial.Ambient.r = r;
	m_kMaterial.Ambient.g = g;
	m_kMaterial.Ambient.b = b;
	m_kMaterial.Ambient.a = a;
}

void Material::SetSpecularColor(float r, float g, float b, float a)
{
	m_kMaterial.Specular.r = r;
	m_kMaterial.Specular.g = g;
	m_kMaterial.Specular.b = b;
	m_kMaterial.Specular.a = a;	
}

void Material::SetEmissiveColor(float r, float g, float b, float a)
{
	m_kMaterial.Emissive.r = r;
	m_kMaterial.Emissive.g = g;
	m_kMaterial.Emissive.b = b;
	m_kMaterial.Emissive.a = a;
}

void Material::SetDiffuseColor(float r, float g, float b, float a)
{
	m_kMaterial.Diffuse.r = r;
	m_kMaterial.Diffuse.g = g;
	m_kMaterial.Diffuse.b = b;
	//m_kMaterial.Diffuse.a = a;
}

void Material::SetPower(float power) 
{ 
	m_kMaterial.Power = power; 
}

void Material::SetTextureName(const std::string& textName) 
{
	m_strTextureName = textName;
}

std::string& Material::GetTextureName() 
{
	return m_strTextureName;
}